-
Notifications
You must be signed in to change notification settings - Fork 619
[MNY-163] Portal: Fix broken links in payments sidebar #8021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
|
WalkthroughRemoved the Playground nav item and unused Changes
Sequence Diagram(s)(omitted — changes are static link updates, no control-flow changes) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed, 2 warnings)❌ Failed Checks (2 warnings)
✅ Passed Checks (3 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8021 +/- ##
=======================================
Coverage 56.65% 56.65%
=======================================
Files 904 904
Lines 58677 58677
Branches 4165 4165
=======================================
Hits 33241 33241
Misses 25330 25330
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/portal/src/app/payments/sidebar.tsx (1)
41-55: Centralize Bridge slug in payments sidebar
No stale/payments/bridge/*links detected. In apps/portal/src/app/payments/sidebar.tsx, introduceconst bridgeSlug = "/bridge";and update each href to use
${bridgeSlug}:@@ -const paymentsSlug = "/payments"; +const paymentsSlug = "/payments"; +const bridgeSlug = "/bridge"; @@ - href: `/bridge/sell`, + href: `${bridgeSlug}/sell`, @@ - href: `/bridge/swap`, + href: `${bridgeSlug}/swap`, @@ - href: `/bridge/tokens`, + href: `${bridgeSlug}/tokens`, @@ - href: `/bridge/routes`, + href: `${bridgeSlug}/routes`,This mirrors the slug constant in apps/portal/src/app/bridge/sidebar.tsx.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/portal/src/app/bridge/sidebar.tsx(1 hunks)apps/portal/src/app/payments/sidebar.tsx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/portal/src/app/payments/sidebar.tsxapps/portal/src/app/bridge/sidebar.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/portal/src/app/payments/sidebar.tsxapps/portal/src/app/bridge/sidebar.tsx
🧠 Learnings (6)
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
PR: thirdweb-dev/js#7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout changes.
Applied to files:
apps/portal/src/app/payments/sidebar.tsx
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
PR: thirdweb-dev/js#7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout PR #7888.
Applied to files:
apps/portal/src/app/payments/sidebar.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use `NavLink` for internal navigation with automatic active states in dashboard and playground apps
Applied to files:
apps/portal/src/app/payments/sidebar.tsxapps/portal/src/app/bridge/sidebar.tsx
📚 Learning: 2025-07-07T21:21:47.488Z
Learnt from: saminacodes
PR: thirdweb-dev/js#7543
File: apps/portal/src/app/pay/page.mdx:4-4
Timestamp: 2025-07-07T21:21:47.488Z
Learning: In the thirdweb-dev/js repository, lucide-react icons must be imported with the "Icon" suffix (e.g., ExternalLinkIcon, RocketIcon) as required by the new linting rule, contrary to the typical lucide-react convention of importing without the suffix.
Applied to files:
apps/portal/src/app/bridge/sidebar.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.
Applied to files:
apps/portal/src/app/bridge/sidebar.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Applied to files:
apps/portal/src/app/bridge/sidebar.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Lint Packages
- GitHub Check: Unit Tests
- GitHub Check: Size
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/portal/src/app/bridge/sidebar.tsx (1)
1-1: Unused icon cleanup after removing Playground: LGTMImport now only brings
ZapIcon; matches current usage.
| href: "https://playground.thirdweb.com/payments", | ||
| icon: <ExternalLinkIcon />, | ||
| name: "Playground", | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Playground URL change: confirm target exists and is treated as external
Looks right; please verify the /payments subpath is live and that our link renderer opens it in a new tab with rel="noopener".
Run:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for url in https://playground.thirdweb.com/ https://playground.thirdweb.com/payments; do
code=$(curl -sI "$url" | awk '/^HTTP/{print $2}' | head -n1)
echo "$url -> HTTP $code"
doneLength of output: 97
🏁 Script executed:
#!/bin/bash
set -euo pipefail
find . -type f -name "sidebar.tsx"Length of output: 1096
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,200p' apps/portal/src/app/payments/sidebar.tsxLength of output: 2788
🏁 Script executed:
#!/bin/bash
set -euo pipefail
find apps/portal/src -type f | grep -i DocLayoutLength of output: 48
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,500p' apps/portal/src/components/Layouts/DocLayout.tsxLength of output: 2249
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,200p' apps/portal/src/components/others/Sidebar.tsxLength of output: 5522
Add rel="noopener noreferrer" to external links in SidebarItem
Verified https://playground.thirdweb.com/payments returns HTTP 200; the Next.js Link in SidebarItem (apps/portal/src/components/others/Sidebar.tsx) sets target="_blank" for external URLs but omits rel—update it to rel="noopener noreferrer".
🤖 Prompt for AI Agents
In apps/portal/src/app/payments/sidebar.tsx around lines 16-19, the Playground
external link uses target="_blank" via SidebarItem but omits rel; modify the
SidebarItem rendering logic in apps/portal/src/components/others/Sidebar.tsx so
that whenever an anchor is rendered with target="_blank" for external URLs it
also includes rel="noopener noreferrer" (ensure the prop is added to the
Link/anchor element generation path for external links).
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating the `sidebar` configuration in two files: `sidebar.tsx` for the bridge and payments sections. It removes an entry and modifies the `href` properties for navigation links to ensure correct routing.
### Detailed summary
- Removed the `Playground` entry from the `sidebar` in `apps/portal/src/app/bridge/sidebar.tsx`.
- Updated the `href` for the `Playground` entry in `apps/portal/src/app/payments/sidebar.tsx` to point to `/payments`.
- Changed `href` values for `Sell Tokens`, `Swap Tokens`, `Get Token Prices`, and `Get Routes` to use absolute paths.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected Payments sidebar destinations: Playground now points to the dedicated payments playground, and Bridge-related items use absolute paths for reliable, consistent navigation across the app.
* **Chores**
* Removed the obsolete Playground link from the Bridge sidebar to streamline navigation.
* Cleaned up an unused icon import.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
62f9fc4 to
e7d0899
Compare

PR-Codex overview
This PR focuses on updating the
sidebarconfiguration in two files:sidebar.tsxin thebridgeandpaymentsdirectories. It modifies the links for the Playground and adjusts thehrefpaths for various items to ensure they are correctly routed.Detailed summary
Playgroundentry from thebridgesidebar.Playgroundlink in thepaymentssidebar to point to/payments.hrefvalues for several items in thepaymentssidebar from relative paths to absolute paths:bridge/sellto/bridge/sellbridge/swapto/bridge/swapbridge/tokensto/bridge/tokensbridge/routesto/bridge/routesSummary by CodeRabbit
Bug Fixes
Chores